import 'package:flutter/cupertino.dart';
import 'package:flutter_plugin/page/home/navigation_data.dart';
import 'package:flutter_plugin/page/home/tab_home/tab_home_view.dart';
import 'package:flutter_plugin/page/home/tab_mine/tab_mine_view.dart';
import 'package:get/get.dart';

class HomeState {
  late List<NavigationData> navigationViews; // 底部图标按钮区域
  List<String> bottomTitle = ["我的守护", "我的"];
  List<String> bottomIcons = ["assets/images/tab/ic_nav_home_uncheck.png", "assets/images/tab/ic_nav_mine_uncheck.png"];
  List<String> bottomSelectIcons = ["assets/images/tab/ic_nav_home.png", "assets/images/tab/ic_nav_mine.png"];

  final PageController pageController = PageController(initialPage: 0);
  final RxInt curPage = 0.obs;

  DateTime? lastPopTime;

  final List<Widget> naviItems = [
    TabHomePage(),
    TabMinePage(),
  ];

  HomeState() {
    navigationViews = [
      for (var i = 0; i < bottomTitle.length; i++) NavigationData(bottomTitle[i], bottomIcons[i], bottomSelectIcons[i])
    ];
  }
}
